﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MKDataBase.Contracts
{
    public interface IDBProvider
    {
        IDBProvider CurrentDB { get;}
        #region MovieManager Operations
        /// <summary>
        /// Adds the A movie.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <returns></returns>
        DBStatus AddAMovie(MovieManagerDataRow row);

        /// <summary>
        /// Gets the movies.
        /// </summary>
        /// <returns></returns>
        List<MovieManagerDataRow> GetMovies();

        /// <summary>
        /// Ups the date movie.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <returns></returns>
        DBStatus UpDateMovie(MovieManagerDataRow row);
        #endregion

        #region MovieDetails Operations

        /// <summary>
        /// Adds the movie details.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <returns></returns>
        DBStatus AddMovieDetails(MovieDetailsDataRow row);

        /// <summary>
        /// Gets the movie details by id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        MovieDetailsDataRow GetMovieDetailsById(int id);

        /// <summary>
        /// Updates the movie details.
        /// </summary>
        /// <param name="row">The row.</param>
        /// <returns></returns>
        DBStatus UpdateMovieDetails(MovieDetailsDataRow row);

        MovieDetailsDataRow MapToMovieDetails(object obj);
        #endregion

        bool DeleteMovie(string MovieName, int ID);
    }

    /// <summary>
    /// EnumDBStatus
    /// </summary>
    public enum DBStatus
    {
        RowDoesNotExist,
        RowExists,
        InvalidData,
        Success,
        Exception
    }
    
}
